package com.itheima.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.domain.Book;

/**
 * className: IBookService
 * description:
 * date: 2023/2/22 0022-PM 11:13:36
 * <p>
 * project: springboot
 * package: com.itheima.service
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
public interface IBookService extends IService<Book> {

    /**
     * 保存
     *
     * @param book {@link Book}
     * @return {@link Boolean}
     */
    boolean saveBook(Book book);

    /**
     * 修改
     *
     * @param book {@link Book}
     * @return {@link Boolean}
     */
    boolean modify(Book book);

    /**
     * 删除
     *
     * @param id {@link Integer}
     * @return {@link Boolean}
     */
    boolean delete(Integer id);

    /**
     * 分页查询
     *
     * @param currentPage {@link Integer}
     * @param pageSize    {@link  Integer}
     * @return {@link IPage<Book>}
     */
    IPage<Book> getPage(int currentPage, int pageSize);

    /**
     * 分页查询
     *
     * @param currentPage {@link Integer}
     * @param pageSize    {@link  Integer}
     * @param book        {@link Book}
     * @return {@link IPage<Book>}
     */
    IPage<Book> getPage(int currentPage, int pageSize, Book book);


}
